.class Lorg/apache/cordova/WqCordovaActivity$4;
.super Ljava/lang/Object;

# interfaces
.implements Landroid/widget/AdapterView$OnItemClickListener;


# instance fields
.field final synthetic this$0:Lorg/apache/cordova/WqCordovaActivity;


# direct methods
.method constructor <init>(Lorg/apache/cordova/WqCordovaActivity;)V
    .locals 0

    iput-object p1, p0, Lorg/apache/cordova/WqCordovaActivity$4;->this$0:Lorg/apache/cordova/WqCordovaActivity;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onItemClick(Landroid/widget/AdapterView;Landroid/view/View;IJ)V
    .locals 5

    iget-object v0, p0, Lorg/apache/cordova/WqCordovaActivity$4;->this$0:Lorg/apache/cordova/WqCordovaActivity;

    iget-object v0, v0, Lorg/apache/cordova/WqCordovaActivity;->menuHashList:Ljava/util/List;

    invoke-interface {v0, p3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/util/HashMap;

    const-string/jumbo v1, "clickAble"

    invoke-virtual {v0, v1}, Ljava/util/HashMap;->containsKey(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_1

    const-string/jumbo v1, "clickAble"

    invoke-virtual {v0, v1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/String;

    const-string/jumbo v1, "0"

    invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_1

    :cond_0
    :goto_0
    return-void

    :cond_1
    iget-object v0, p0, Lorg/apache/cordova/WqCordovaActivity$4;->this$0:Lorg/apache/cordova/WqCordovaActivity;

    iget-object v0, v0, Lorg/apache/cordova/WqCordovaActivity;->callbackContextMenu:Lorg/apache/cordova/CallbackContext;

    if-eqz v0, :cond_2

    :try_start_0
    iget-object v0, p0, Lorg/apache/cordova/WqCordovaActivity$4;->this$0:Lorg/apache/cordova/WqCordovaActivity;

    iget-object v1, v0, Lorg/apache/cordova/WqCordovaActivity;->callbackContextMenu:Lorg/apache/cordova/CallbackContext;

    new-instance v2, Lorg/json/JSONObject;

    invoke-direct {v2}, Lorg/json/JSONObject;-><init>()V

    const-string/jumbo v3, "position"

    iget-object v0, p0, Lorg/apache/cordova/WqCordovaActivity$4;->this$0:Lorg/apache/cordova/WqCordovaActivity;

    iget-object v0, v0, Lorg/apache/cordova/WqCordovaActivity;->menuHashList:Ljava/util/List;

    invoke-interface {v0, p3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/util/HashMap;

    const-string/jumbo v4, "id"

    invoke-virtual {v0, v4}, Ljava/util/HashMap;->containsKey(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_3

    iget-object v0, p0, Lorg/apache/cordova/WqCordovaActivity$4;->this$0:Lorg/apache/cordova/WqCordovaActivity;

    iget-object v0, v0, Lorg/apache/cordova/WqCordovaActivity;->menuHashList:Ljava/util/List;

    invoke-interface {v0, p3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/util/HashMap;

    const-string/jumbo v4, "id"

    invoke-virtual {v0, v4}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/io/Serializable;

    :goto_1
    invoke-virtual {v2, v3, v0}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    move-result-object v0

    invoke-virtual {v1, v0}, Lorg/apache/cordova/CallbackContext;->success(Lorg/json/JSONObject;)V
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    :cond_2
    :goto_2
    iget-object v0, p0, Lorg/apache/cordova/WqCordovaActivity$4;->this$0:Lorg/apache/cordova/WqCordovaActivity;

    iget-object v0, v0, Lorg/apache/cordova/WqCordovaActivity;->popupWindow:Landroid/widget/PopupWindow;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lorg/apache/cordova/WqCordovaActivity$4;->this$0:Lorg/apache/cordova/WqCordovaActivity;

    iget-object v0, v0, Lorg/apache/cordova/WqCordovaActivity;->popupWindow:Landroid/widget/PopupWindow;

    invoke-virtual {v0}, Landroid/widget/PopupWindow;->dismiss()V

    goto :goto_0

    :cond_3
    :try_start_1
    invoke-static {p3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
    :try_end_1
    .catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_0

    move-result-object v0

    goto :goto_1

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Lorg/json/JSONException;->printStackTrace()V

    goto :goto_2
.end method
